﻿@{
    var s = " ";
}
<!--header -->
<div id="header">
    <div id="header-links">
        <!--<p>
			<a href="index.html">Home</a> | 
			<a href="index.html">Contact</a> | 
			<a href="index.html">Site Map</a>			
		</p>-->
        @{
            if (Session.Count > 0)
            {
                
            <p>
                Bienvenido <b>@Session["login"]</b>, (@Session["empresa"])</p>
            
            }
            
        }
    </div>
    <!--header ends-->
</div>
<div id="header-photo">
    <h1 id="logo-text">
        <a href="/" title="">Clientomatic</a></h1>
    <h2 id="slogan">
        Promociones, cotizaciones, y mucho más!</h2>
</div>
<!-- navigation starts-->
<div id="nav">
    @{
    
        if (Session.Count == 0)
        {
            using (Html.BeginForm("loguear", "Sesion"))
            { 
   
        <div class="espacio">
            <table id="tabla_login">
                <tr>
                    <th class="izquierda">
                        Login:
                    </th>
                    <th class="izquierda">
                        Clave:
                    </th>
                </tr>
                <tr>
                    <td>@Html.TextBox("login", "", new { size = 20 })
                    </td>
                    <td>@Html.Password("clave", "", new { size = 20 })
                    </td>
                    <td>
                        <input type="submit" value="Iniciar Sesion" />
                    </td>
                </tr>
                <tr style="color: #899DB1;">
                    <td>
                        <input type="checkbox" name="cookie" />
                        No cerrar sesión
                    </td>
                    <td>@Html.ActionLink("Recuperar clave", "lost_clave", "sesion")
                    </td>
                </tr>
            </table>
        </div>
            }
        }
        else
        {
    
        <ul>
            <li @if (ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString() == "Sesion") { s = "id=current"; }@s >@Html.ActionLink("Inicio", "Index", "Sesion")</li>
            <li @if (ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString() == "Promocion") { s = "id=current"; } else { s = " "; }@s >@Html.ActionLink("Promociones", "Index", "Promocion")</li>
            <li @if (ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString() == "Cotizacion") { s = "id=current"; } else { s = " "; } @s >@Html.ActionLink("Cotizaciones", "Index", "Cotizacion")</li>
            @if((int)Session["rol"] == 2){
            <li @if (ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString() == "Administracion") { s = "id=current"; } else { s = " "; } @s >@Html.ActionLink("Administracion", "Index", "Administracion")</li>
                }
            <li>@Html.ActionLink("Salir", "salir", "Sesion")</li>
        </ul>
          
        }
    }
    <!-- navigation ends-->
</div>
